package com.snowy.framework.wechatAuth.service;

import com.snowy.framework.wechatAuth.dto.req.WechatAuthReq;
import com.snowy.framework.wechatAuth.dto.req.WechatSignatureReq;
import com.snowy.framework.wechatAuth.dto.resp.SignatureResp;
import com.snowy.framework.wechatAuth.dto.resp.WechatUserInfo;

/**
 * 微信认证服务
 *
 * @author hjl
 */
public interface WechatAuthService {
    /**
     * 根据授权码取微信用户信息
     *
     * @param wechatAuthReq
     * @return
     */
    WechatUserInfo getWechatUserInfo(WechatAuthReq wechatAuthReq);

    /**
     * 获取微信JS-SDK签名
     *
     * @param wechatSignatureReq
     * @return
     */
    SignatureResp getWechatSDKSignature(WechatSignatureReq wechatSignatureReq);

    /**
     * 根据授权码获取手机号
     *
     * @param code        授权码
     * @param accessToken accessToken
     * @return 手机号
     */
    String getPhoneByAuthCode(String accessToken, String code);
}
